<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图书管理系统</title>
    <link rel="stylesheet" href="../style/font-awesome.min.css">
    <link rel="stylesheet" href="../style/admin.css">
    <script src="../JQ/jquery-3.3.1.min.js" type="text/javascript" charset="UTF-8"></script>
    <script src="../JQ/jq-paginator.js" type="text/javascript" charset="UTF-8"></script>
    <script src="../style/admin.js" type="text/javascript" charset="UTF-8"></script>
</head>
<body>
<table cellpadding="0" cellspacing="0">
    <tr>
        <th>编号</th><th>用户名</th><th>账号</th><th>密码</th><th>权限</th><th>注册时间</th><th>登录次数</th><th>最后登陆时间</th><th>操作</th>
    </tr>
    {foreach $array(key,value)}
        <tr>
            <td>{$value[id]}</td><td>{$value[username]}</td><td>{$value[account]}</td><td>{$value[password]}</td><td>{$value[permissions]}</td><td>{$value[regtime]}</td><td>{$value[lognumber]}</td><td>{$value[lasttime]}</td>
            <td><a class="mod_a" href="../admin/book_de.php?action=mod&id={$value[id]}">修改</a> | <a class="del_a" href="../admin/book_de.php?action=del&id={$value[id]}" onclick="return confirm('是否删除此管理员')?true:false">删除</a></td>
        </tr>
    {/foreach}
</table>
<p class="p_add">[ <a href="javascript:;" class="a_add">添加管理员</a> ]</p>
<div id="Pagetext">
    <div class="pagefirst">{$first}</div>
    <div class="pagenumber">
        <div class="number">{$pagelist}</div>
    </div>
    <div class="pagelast">{$last}</div>
</div>


<form id="add" action="../admin/book_de.php" method="post">
    <i class="img_close fa fa-close"></i>
    <p style="margin-top: 20px">
        用户名：<input type="text" class="addName" name="username" autocomplete="off">
        <i class="add_i fa fa-check"></i><br>
        <i class="errText"></i>
    </p>
    <p>
        账&nbsp;&nbsp;&nbsp;号：<input type="text" class="addOunt" name="account" autocomplete="off">
        <i class="add_i fa fa-check"></i><br>
        <i class="errText"></i>
    </p>
    <p>
        密&nbsp;&nbsp;&nbsp;码：<input type="password" class="addPass" name="pass">
        <i class="add_i fa fa-check"></i><br>
        <i class="errText"></i>
    </p>
    <p>
        <select name="select" id="select" class="addLect">
            <option value="0">---请选择---</option>
            <option value="超级管理员">超级管理员</option>
            <option value="管理员">管理员</option>
            <option value="游客">游客</option>
        </select><br>
        <i class="errText"></i>
    </p>
    <p><input class="sub_add" type="submit" value="添加" name="sub_add" disabled="disabled"></p>
</form>

{if $bool}
    <form id="mod" action="../admin/book_de.php" method="post">
        <i class="img_close fa fa-close"></i>
        <p style="display: none">
            <input type="hidden" value="{$permissions}" name="permissions" class="permissions">
            <input type="hidden" value="{$mod_id}" name="mod_id" class="mod_id">
        </p>
        <p style="margin-top: 20px">
            用户名：<input type="text" value="{$name}" name="mod-username" autocomplete="off">
            <i class="add_i mod_img fa fa-check"></i><br>
            <i class="errText"></i>
        </p>
        <p>
            账&nbsp;&nbsp;&nbsp;号：<input type="text" name="mod-account" value="{$account}" autocomplete="off">
            <i class="add_i mod_img fa fa-check"></i><br>
            <i class="errText"></i>
        </p>
        <p>
            密&nbsp;&nbsp;&nbsp;码：<input type="password" name="mod-pass" value="{$pass}" autocomplete="off">
            <i class="add_i mod_img fa fa-check"></i><br>
            <i class="errText"></i>
        </p>
        <p>
            <select name="mod-select" id="select" class="modLect">
                <option class="mod_select" value="0" selected="selected">---请选择---</option>
                <option class="mod_select" value="超级管理员">超级管理员</option>
                <option class="mod_select" value="管理员">管理员</option>
                <option class="mod_select" value="游客">游客</option>
            </select><br>
            <i class="errText"></i>
        </p>
        <input class="sub_mod" type="submit" value="修改" name="sub_mod" disabled="disabled">
    </form>
{/if}
</body>
</html>